<template>
    <el-card shadow="never">
        <div slot="header">动态表单(text)</div>
        <DynamicForm :schema="schema" :formData="formData"></DynamicForm>
        <div class="markdown-body">
            <CodeTpl></CodeTpl>
        </div>
    </el-card>
</template>

<script>
import CodeTpl from './md/text.md';

export default {
    components: {
        CodeTpl
    },
    data() {
        return {
            schema: {
                properties: {
                    name: {
                        label: '展示',
                        widget: 'text',
                    },
                    name1: {
                        label: '什么都没有',
                        widget: 'text',
                    }
                },
                ui: {
                    labelWidth: 'auto'
                },
                grid: {
                    row: {
                        gutter: 20
                    },
                    col: {
                        span: 12
                    }
                }
            },
            formData: {
                name: '只展示文字'
            }
        }
    },
}
</script>

<style>

</style>